package com.wnn.demo.model.news.mapper;

import com.wnn.demo.domain.News;
import com.wnn.demo.domain.Newsque;
import com.wnn.demo.domain.Task;
import com.wnn.demo.utils.IBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

public interface NewsMapper extends IBaseMapper<News> {

	/**
	 *
	 * @param news
	 */
	void save(News news);

	/**
	 *
	 * @param id
	 */
	Integer submit(String id);

	/**
	 *
	 * @return
	 */
	List<News> findList(@Param("titles") String titles,@Param("createBy") String createBy,@Param("startTime") String startTime,@Param("endTime") String endTime);

	/**
	 *
	 * @param news
	 * @return
	 */
	News selectOne(News news);

	/**
	 *
	 * @param id
	 */
	Integer deletedOne(String id);

	/**
	 *
	 * @param news
	 */
	void update(News news);

	/**
	 *
	 * @param id
	 */
	Integer submitId(String id);

	/**
	 *
	 * @return
	 */
	List<News> findAuditList(@Param("titles") String titles,@Param("createBy") String createBy,@Param("startTime") String startTime,@Param("endTime") String endTime);

	List<News> findReleaseNews(@Param("titles") String titles,@Param("createBy") String createBy,@Param("startTime") String startTime,@Param("endTime") String endTime);

	List<News> selectByTime(News news);

	Integer back(String id);

	List<News> selectNewByName(Newsque newsque);

//    List<Task> unfinishTask();
	

}
